package com.jiajiankang.myspace;

import java.util.List;
import java.util.Map;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.ListView;
import android.widget.SimpleAdapter;

import com.jiajiankang.R;
import com.jiajiankang.index.sixButton;

public class WaitPay extends sixButton {
	private Button btnback;
	private ListView listview;
	private List<Map<String, Object>> data = null;
	private SimpleAdapter adapter;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.waitpay);
		listview = (ListView) findViewById(R.id.waitpay_lv);
		data = WaitPay_myDataSource.getData();
		adapter = new SimpleAdapter(WaitPay.this, data, R.layout.waitpay_list,
				new String[] { "order_number", "order_value",
						"order_time", "img1", 
						"img2", "img3"
						},
				new int[] { R.id.waitpay_order_number,
						R.id.waitpay_order_value, R.id.waitpay_order_time,
					R.id.waitpay_list_iv1, 
						R.id.waitpay_list_iv2,R.id.waitpay_list_iv3
						});
		listview.setAdapter(adapter);

		btnback = (Button) findViewById(R.id.waitpay_back);
		btnback.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				Intent intent = new Intent();
				intent.setClass(WaitPay.this, MySpace.class);
				startActivity(intent);
				WaitPay.this.finish();
			}
		});
		myClickHandler();
	}
}
